package com.xhui.vimarket.common.exception;

/**
 */

public class DAOException extends BaseException {
    
    /**
     * .
     */
    private static final long serialVersionUID = 1L;
    
    /**
     * @param anErrorMsg
     *            String 错误信息
     * @param aRootCause
     *            hrowable 异常
     */
    
    public DAOException(final String anErrorMsg, final Throwable aRootCause) {
        this.setErrorMsg(anErrorMsg);
        super.setRootCause(aRootCause);
    }
    
    /**
     * @param anErrorMsg
     *            String 错误信息
     * @param anErrorCode
     *            String 错误码
     * @param aRootCause
     *            Throwable 异常
     */
    
    public DAOException(final String anErrorMsg, final String anErrorCode,
        final Throwable aRootCause) {
        this.setErrorMsg(anErrorMsg);
        super.setMessageKey(anErrorCode);
        super.setRootCause(aRootCause);
    }
    
    /**
     * @param anErrorMsg
     *            String 错误信息
     */
    
    public void setErrorMsg(final String anErrorMsg) {
        super.setPlusInfo(anErrorMsg);
    }
    
    /**
     * @return String
     */
    
    public String getErrorMsg() {
        return super.getPlusInfo();
    }
}
